.PHONY:Broker
Broker:Broker.cpp ../mqcommon/msg.pb.cc ../mqcommon/proto.pb.cc ../third/protobuf/codec.cc
	g++ -g $^ -o $@ -std=c++11 -I../third/include -L../third/lib -lmuduo_net -lmuduo_base -lpthread -lz -lgtest -lprotobuf -lsqlite3
Connection:Connection.cpp ../mqcommon/msg.pb.cc ../mqcommon/proto.pb.cc
	g++ -g $^ -o $@ -std=c++11 -I../third/include -L../third/lib -lmuduo_net -lmuduo_base -lpthread -lz -lgtest -lprotobuf -lsqlite3
Channel:Channel.cpp ../mqserver/msg.pb.cc ../mqserver/proto.pb.cc
	g++ -g $^ -o $@ -std=c++11 -I../third/include -L../third/lib -lmuduo_net -lmuduo_base -lpthread -lz -lgtest -lprotobuf -lsqlite3
Consumer:Consumer.cpp ../mqserver/msg.pb.cc
	g++ -g $^ -o $@ -std=c++11 -lgtest -lprotobuf -lsqlite3
Route:Route.cpp ../mqserver/msg.pb.cc
	g++ -g $^ -o $@ -std=c++11 -lgtest -lprotobuf -lsqlite3
Host:Host.cpp ../mqserver/msg.pb.cc
	g++ -g $^ -o $@ -std=c++11 -lgtest -lprotobuf -lsqlite3
Message:Message.cpp ../mqserver/msg.pb.cc
	g++ -g $^ -o $@ -std=c++11 -lgtest -lprotobuf -lsqlite3
Binding:Binding.cpp
	g++ $^ -o $@ -std=c++11 -lgtest -lprotobuf -lsqlite3
Msgqueue:Msgqueue.cpp
	g++ $^ -o $@ -std=c++11 -lgtest -lprotobuf -lsqlite3
Exchange:Exchange.cpp
	g++ $^ -o $@ -std=c++11 -lgtest -lprotobuf -lsqlite3
clean:
	rm -rf ./data Exchange Msgqueue Binding Message Host Route Consumer Channel Connection Broker